//
//  RadioButton.swift
//  SimpleCal
//
//  Created by 杜晓祥 on 2021/11/5.
//

import Foundation

class RadioButtonGroup<T: BaseButton> {
    private var buttonList = [T]()
    private var selectButton:T?
    
    
    
    func addSubview(_ button: T)  {
        button.state = .off
        //button.action = #selector(tagglePop(_:))
        buttonList.append(button)
    }
    
    func getSubview(_ index: Int) -> T {
        return buttonList[index]
    }
    
    func findAll() -> [T] {
        return buttonList
    }
    
    func  count() -> Int {
        return buttonList.count
    }
    
    @objc func tagglePop(_ sender: Any?) {
        print("组点击")
    }
    
    
}
